<template>
    <div class="confirmationBox" v-if="isShow">
      <div class="mask-div"></div>
      <div class="out-line-box animate__animated animate__zoomIn">
        <div class="confirmation-content-box">
          <!-- 左上角盒子  -->
          <section class="left-top-corner">
            <div class="div1"></div>
            <div class="div2"></div>
          </section>
          <!-- 右下角 -->
          <section class="right-bottom-corner">
            <div class="div1"></div>
            <div class="div2"></div>
          </section>

          <!-- 标题和描述 -->
          <div class="confirmation-title">{{ text.title }}</div>
          <div class="confirmation-msg">{{ text.msg }}</div>

          <!-- 底部两个按钮 -->
          <div class="btn-back-and-ok">
            <!-- 返回按钮 -->
            <div class="go-back-btn-out-line" @click="cancel">
              <div class="go-back-btn">
                <section class="back-btn-left-top-corner">
                  <div class="div1"></div>
                  <div class="div2"></div>
                </section>

                <section class="back-btn-right-bottom-corner">
                  <div class="div1"></div>
                  <div class="div2"></div>
                </section>

                <span style="position: relative; top: -2px;">{{  text.btn.cancelVal }}</span>
              </div>
            </div>


            <!-- 确认按钮 -->
            <div class="ok-btn-out-line" @click="confirm">
            <div class="ok-btn">

              <section class="ok-btn-left-top-corner">
                <div class="div1"></div>
                <div class="div2"></div>
              </section>

              <section class="ok-btn-right-bottom-corner">
                <div class="div1"></div>
                <div class="div2"></div>
              </section>

              <span style="position: relative; top: -2px;">{{  text.btn.confirmVal }}</span>
            </div>
            </div>
          </div>
        </div>
      </div>
    </div>
</template>

<script>
export default {
  name: "confirmationBox",
  data(){
    return{
      isShow: true,
      text: {
        title: "提示",
        msg: "描述信息！",
        cancelBtn: true,
        confirmBtn: true,
        btn: {
          confirmVal: "确定",
          cancelVal: "取消"
        }
      }
    }
  },
  mounted() {
    // this.isShow = false;
  },
  methods:{
    //取消
    cancel() {
      this.isShow = false;
    },
    //确认
    confirm() {
      this.isShow = false;
    },

  }
}
</script>

<style scoped>
.confirmationBox{
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
}

.mask-div{
  position: absolute;
  width: 100%;
  height: 100%;
  /*opacity: .5;*/
  /*background: #161a1c;*/
  background: #161a1cde;
  z-index: 9999999;
}

/*外边框*/
.out-line-box{
  box-shadow:  0 0 10px 2px #63c6ffa1;
  height: 300px;
  width: 600px;
  margin: auto;
  border-top-left-radius: 7px;
  border-bottom-right-radius: 7px;
  z-index: 9999999;
  position: relative;
  top: calc((100% - 300px) / 2);

}
/*内容*/
.confirmation-content-box{
  height: 100%;
  width: 100%;
  border: 3px solid #63c6ff;
  border-top-left-radius: 7px;
  border-bottom-right-radius: 7px;
  box-shadow: 0 0 15px 6px #63c6ffa1 inset;
}

.confirmation-title{
  color: #63c6ff;
  font-size: 24px;
  position: relative;
  top: 30px;
  text-align: center;
  letter-spacing: 2px;
}

.confirmation-msg{
  color: #fff;
  font-size: 26px;
  position: relative;
  top: 60px;
  text-align: center;
  letter-spacing: 1px;
}

/*返回、确认按钮--*/
.btn-back-and-ok{
  position: absolute;
  bottom: 60px;
  width: 100%;
  font-size: 18px;
  text-align: center;
  color: #fff;
}

.go-back-btn-out-line:hover{
  background: #c767605c;
  transition: 0.5s all;
  cursor: pointer;
}
.go-back-btn-out-line{
  box-shadow:  0 0 1px 1px #b7554d;
  height: 40px;
  width: 180px;
  margin: auto;
  border-top-left-radius: 7px;
  border-bottom-right-radius: 7px;
  z-index: 9999999;
  position: relative;
  left: -15px;
  display: inline-block;
  line-height: 40px;
}
.go-back-btn{
  height: 100%;
  width: 100%;
  border: 2px solid #e06157;
  border-top-left-radius: 7px;
  border-bottom-right-radius: 7px;
  box-shadow: 0 0 8px 1px #b7554d inset;
  letter-spacing: 3px;
  color: #c76760;
}
.back-btn-left-top-corner{
  display: inline-block;
  height: auto;
  position: absolute;
  top: 0;
  left: 2px;
}
.back-btn-left-top-corner .div1{
  height: 0;
  display: inline-block;
  width: 10px;
  border-bottom: 3px solid #e06157;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotateZ(90deg);
  position: absolute;
  top: 10px;
}
.back-btn-left-top-corner .div2{
  height: 0;
  display: inline-block;
  width: 10px;
  border-bottom: 3px solid #e06157;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotateZ(180deg);
  position: absolute;
  top: 5px;
  left: 6px;
}
.back-btn-right-bottom-corner{
  display: inline-block;
  height: auto;
  position: absolute;
  bottom: 0;
  right: 2px;
  transform: rotateZ(180deg);
}
.back-btn-right-bottom-corner .div1{
  height: 0;
  display: inline-block;
  width: 10px;
  border-bottom: 3px solid #e06157;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotateZ(90deg);
  position: absolute;
  top: 10px;
}
.back-btn-right-bottom-corner .div2{
  height: 0;
  display: inline-block;
  width: 10px;
  border-bottom: 3px solid #e06157;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotateZ(180deg);
  position: absolute;
  top: 5px;
  left: 6px;
}


.ok-btn-out-line:hover{
  background: #56a9db54;
  transition: 0.5s all;
  cursor: pointer;
}
.ok-btn-out-line{
  box-shadow:  0 0 1px 1px #63c6ffa1;
  height: 40px;
  width: 180px;
  margin: auto;
  border-top-left-radius: 7px;
  border-bottom-right-radius: 7px;
  z-index: 9999999;
  position: relative;
  left: 15px;
  display: inline-block;
  line-height: 40px;
}
.ok-btn{
  height: 100%;
  width: 100%;
  border: 2px solid #63c6ff;
  border-top-left-radius: 7px;
  border-bottom-right-radius: 7px;
  box-shadow: 0 0 8px 1px #63c6ffa1 inset;
  letter-spacing: 3px;
  color: #56a9db;
}
.ok-btn-left-top-corner{
  display: inline-block;
  height: auto;
  position: absolute;
  top: 0;
  left: 2px;
}
.ok-btn-left-top-corner .div1{
  height: 0;
  display: inline-block;
  width: 10px;
  border-bottom: 3px solid #63c6ff;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotateZ(90deg);
  position: absolute;
  top: 10px;
}
.ok-btn-left-top-corner .div2{
  height: 0;
  display: inline-block;
  width: 10px;
  border-bottom: 3px solid #63c6ff;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotateZ(180deg);
  position: absolute;
  top: 5px;
  left: 6px;
}
.ok-btn-right-bottom-corner{
  display: inline-block;
  height: auto;
  position: absolute;
  bottom: 0;
  right: 2px;
  transform: rotateZ(180deg);
}
.ok-btn-right-bottom-corner .div1{
  height: 0;
  display: inline-block;
  width: 10px;
  border-bottom: 3px solid #63c6ff;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotateZ(90deg);
  position: absolute;
  top: 10px;
}
.ok-btn-right-bottom-corner .div2{
  height: 0;
  display: inline-block;
  width: 10px;
  border-bottom: 3px solid #63c6ff;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotateZ(180deg);
  position: absolute;
  top: 5px;
  left: 6px;
}

/*返回、确认按钮end*/



/*大盒子-左上角*/
.left-top-corner{
  display: inline-block;
  height: auto;
  position: relative;
  top: 15px;
  left: 7px;
}
.left-top-corner .div1{
  height: 0;
  display: inline-block;
  width: 20px;
  border-bottom: 5px solid #63c6ff;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  transform: rotateZ(90deg);
  position: relative;
  top: 5px;
}
.left-top-corner .div2{
  height: 0;
  display: inline-block;
  width: 20px;
  border-bottom: 5px solid #63c6ff;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  transform: rotateZ(180deg);
  position: relative;
  top: -8px;
  left: -12px;
}
/*左上角end*/

/*大盒子-右下角*/
.right-bottom-corner{
  display: inline-block;
  height: auto;
  position: absolute;
  right: 7px;
  bottom: 15px;
  transform: rotateZ(180deg);
}
.right-bottom-corner .div1{
  height: 0;
  display: inline-block;
  width: 20px;
  border-bottom: 5px solid #63c6ff;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  transform: rotateZ(90deg);
  position: relative;
  top: 5px;
}
.right-bottom-corner .div2{
  height: 0;
  display: inline-block;
  width: 20px;
  border-bottom: 5px solid #63c6ff;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  transform: rotateZ(180deg);
  position: relative;
  top: -8px;
  left: -12px;
}
/*右下角end*/
</style>
